package com.tianquan.test.Bean;/**
 * @description:
 * @author tianquan
 * @date 2024-11-11 上午10:59
 */

import com.tianquan.miracle.annotation.Component;
import com.tianquan.miracle.postprocessor.BeanPostProcessor;

/**
 * @BelongsProject: Middleware
 * @BelongsPackage: com.tianquan.test.Bean
 * @Author: tianquan
 * @CreateTime: 2024-11-11  10:59
 * @Description: TODO
 * @Version: 1.0
 */
@Component
public class ABeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) {
        if (bean instanceof A) System.out.println("A postProcess-Before-Initialization");
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) {
        if (bean instanceof A) System.out.println("A postProcess-After-Initialization");
        return bean;
    }
}
